//
//  EssayModel.m
//  YHYRealx
//
//  Created by yanghuiyan on 16/4/23.
//  Copyright © 2016年 yanghuiyan. All rights reserved.
//

#import "EssayModel.h"
#import "AutoModel.h"
@implementation EssayModel

- (void)dealloc {
    
    [_hp_title release];
    [_guide_word release];
    [_author release];
    [_user_name release];
    [super dealloc];
}

- (instancetype)initWithDataSource:(NSDictionary *)dataSource {
    self = [super init];
    if (self) {
        
        [self setValuesForKeysWithDictionary:dataSource];
        
        NSMutableArray *array = [NSMutableArray array];
        for (NSDictionary *dic in self.author) {
            AutoModel *model = [[AutoModel alloc] initWithDataSource:dic];
            [array addObject:model];
            [model release];
        }
        self.author = [NSArray arrayWithArray:array];
        
    }
    return self;
}

@end
